<?php
    
	add_filter('cv_init_options', 'pf_init_options');
	
	function pf_init_options($opt) {
		global $pf_settings;
		$info = array('Always show', 'Show on rollover');
		$entries_amount = array("Select a number:","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30");
		$pf_content = array('show-excerpt', 'no-excerpt');
		
		// The portfolio settings
		$opt[] = array( "name" => __("Portfolio", hybrid_get_textdomain()),
							"type" => "heading");
		if($pf_settings['portfolio_type'] == 'lightbox') {
			$opt[] = array( "name" => __("Show helper text", hybrid_get_textdomain()),
								"desc" => __("Check to show helper text / hint", hybrid_get_textdomain()),
								"id" => "pf_enable_show_helper",
								"std" => false,
								"type" => "checkbox"); 
			$opt[] = array( "name" => __("Show info", hybrid_get_textdomain()),
								"desc" => __("How to show the image information", hybrid_get_textdomain()),
								"id" => "pf_show_info",
								"std" => "Always show",
								"type" => "select",
								"options" => $info); 		
		}
		$opt[] = array( "name" => __("Show image excerpt", hybrid_get_textdomain()),
							"desc" => __("Select to show the post excerpt below the image.", hybrid_get_textdomain()),
							"id" => "pf_show_image_excerpt",
							"std" => "show-excerpt",
							"type" => "select",
							"options" => $pf_content);
		if($pf_settings['portfolio_type'] == 'lightbox') {
			$opt[] = array( "name" => __("Image excerpt length", hybrid_get_textdomain()),
								"desc" => __("Length of post excerpt. e.g. If you input '200', the post excerpt will be less than 200.", hybrid_get_textdomain()),
								"id" => "pf_excerpt_length",
								"std" => "200",
								"type" => "text");	
		
			$opt[] = array( "name" => __("Speed", hybrid_get_textdomain()),
								"desc" => __("What time (in milliseconds) should we take to perform transitions between images", hybrid_get_textdomain()),
								"id" => "pf_speed",
								"std" => "",
								"type" => "text"); 
			$opt[] = array( "name" => __("Opacity", hybrid_get_textdomain()),
								"desc" => __("What opacity (default is 0.9) should we apply to the overlay", hybrid_get_textdomain()),
								"id" => "pf_opacity",
								"std" => "",
								"type" => "text"); 
		}
		$opt[] = array( "name" => __("Potfolio items amount", hybrid_get_textdomain()),
							"desc" => __("Amount of portfolio items per page.", hybrid_get_textdomain()),
							"id" => "pf_item_amount",
							"std" => "12",
							"type" => "select",
							"options" => $entries_amount);	
		
		$cats = array("placebo" => "placebo");  
		$cats_obj = get_categories('hide_empty=0');
		foreach ($cats_obj as $cat) {
			$cats[$cat->cat_ID] = $cat->cat_name;}			
		
		$categories = array( 
			"disabled" => $cats, 
			"enabled" => array ("placebo" => "placebo")
		);		
		
		$opt[] = array( "name" => __("Portfolio categories", hybrid_get_textdomain()),
					"desc" => __("Organize which categories you want to show on the portfolio page", hybrid_get_textdomain()),
					"id" => "pf_categories",
					"std" => $categories,
					"type" => "sorter",
					"options" => $cats);
							
		$opt = apply_filters( 'cv_portfolio_options', $opt);			

		return $opt; 
}

?>
